package Book;

public class BookList {
    //定义书架
   book [] book = new book[10];
   protected int bookSize;
   public BookList() {
       book[0] = new book("西游记","吴承恩","小说");
       book[1] = new book("红楼梦","曹雪芹","小说");
       book[2] = new book("水浒传","罗贯中","小说");

       this.bookSize = 3;
   }

    public int getBookSize() {
        return bookSize;
    }

    public void setBookSize(int bookSize) {
        this.bookSize = bookSize;
    }

    public book getBook(int pos) {
        return book[pos];
    }

    public book[] getBook() {
        return book;
    }

    public void setBook(book[] book) {
        this.book = book;
    }

    public void setBook(int pos, book b) {
        this.book[pos] =b;
    }
}
